console.log("====================")
$("#editccbpayType").change(function (){
    var reslist=$("#editccbpayType").select2("data");
    $("#editccbpayTypes").val(payTypes(reslist));
});


$("#ccbpayType").change(function(){
    var reslist=$("#ccbpayType").select2("data");
    $("#ccbpayTypes").val(payTypes(reslist));
});

function editccbpay(i) {
    $("#editccbpayMchPrivateKey").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.FRONTURL");
    $("#editccbpayPlatPublicKey").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.MCHNO");
    $("#editccbpayNotifyUrl").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.REQSIGNPRIVATEKEY");
    $("#editccbpayPayNotifyUrl").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.CERTGROUPNO");
   $("#editccbpayMchId").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.OPENMERCODE");
   $("#editccbpayMchPwd").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.OPENMERNAME");
   $("#editccbpayReqUrl").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.REQENCRYPTPUBLICKEY");
    $("#editccbpayEncryptHost").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.RESDECRYPTPRIVATEKEY");
   $("#editccbpayMchAppId").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.OPENBUSITYPE");
   $("#editccbpayNOTIFYURL").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.NOTIFYURL");


    $("#editccbpayTypes").attr("name", "payCompanyInfos[" + i + "].payType");

    $("#editccbpayType").attr("data-placeholder", "请从列表选择一项");
    $("#editccbpayType").attr("required", "");

    $("#editccbpayUrl").attr("required", "");
    $("#editccbpayKey").attr("required", "");
    $("#editccbpayCCBIBSVersion").attr("required", "");
    $("#editccbpayPtStyle").attr("required", "");
    $("#editccbpayPtLanguage").attr("required", "");
    $("#editccbpayCampusId").attr("required", "");
    $("#editccbpayCorpId").attr("required", "");
    $("#editccbpayMchAppId").attr("required", "");
    $("#editccbpayReqUrl").attr("required", "");
    $("#editccbpayEncryptHost").attr("required", "");
    $("#editccbpayNOTIFYURL").attr("required", "");
}

function ccbpay(i) {

    $("#ccbpayMchPrivateKey").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.FRONTURL");
    $("#ccbpayPlatPublicKey").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.MCHNO");
    $("#ccbpayNotifyUrl").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.REQSIGNPRIVATEKEY");
    $("#ccbpayPayNotifyUrl").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.CERTGROUPNO");
    $("#ccbpayMchId").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.OPENMERCODE");
    $("#ccbpayMchPwd").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.OPENMERNAME");
      $("#ccbpayReqUrl").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.REQENCRYPTPUBLICKEY");
      // $("#ccbpayEncryptHost").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.encryptHost");
      $("#ccbpayMchAppId").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.OPENBUSITYPE");
      $("#ccbpayEncryptHost").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.RESDECRYPTPRIVATEKEY");
      $("#ccbpayNOTIFYURL").attr("name", "payCompanyInfos[" + i + "].ccbPayVo.NOTIFYURL");



    $("#ccbpayTypes").attr("name", "payCompanyInfos[" + i + "].payType");


    $("#ccbpayPayType").attr("data-placeholder", "请从列表选择一项");
    $("#ccbpayPayType").attr("required", "");


}